home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr49 / fgfx12.zip / EFFECTS.FOR < prev    next >
Text File  |  1995-02-14  |  23KB  |  658 lines

  1. C*****************************************************************************
  2. C                                                                            *
  3. C  EFFECTS.FOR                                                               *
  4. C                                                                            *
  5. C  This program demonstrates several methods of fading in an image from an   *
  6. C  off-screen video page using either Fastgraph or Fastgraph/Light.  The set *
  7. C  of routines provided herein are written for 320x200 graphics video modes, *
  8. C  but they could easily be extended to work in other resolutions.           *
  9. C                                                                            *
  10. C  The examples are by no means all inclusive.  Rather, their purpose is to  *
  11. C  illustrate a few methods of creating special effects with Fastgraph or    *
  12. C  Fastgraph/Light.                                                          *
  13. C                                                                            *
  14. C  To compile this program and link it with Fastgraph version 4.0:           *
  15. C                                                                            *
  16. C     FL /FPi /4I2 /4Nt /AM EFFECTS.FOR /link FGM   (MS FORTRAN 4.x/5.x)     *
  17. C     FL32 EFFECTS.FOR FG32MSF.LIB                  (FORTRAN PowerStation)   *
  18. C                                                                            *
  19. C  This program also can be linked with Fastgraph/Light if you replace the   *
  20. C  FGM library reference with FGLM.                                          *
  21. C                                                                            *
  22. C  Fastgraph (tm) and Fastgraph/Light (tm) are graphics libraries published  *
  23. C  by Ted Gruber Software.  For more info, please call, write, or FAX.       *
  24. C                                                                            *
  25. C  Ted Gruber Software                           orders/info (702) 735-1980  *
  26. C  PO Box 13408                                          FAX (702) 735-4603  *
  27. C  Las Vegas, NV  89112                                  BBS (702) 796-7134  *
  28. C                                                                            *
  29. C*****************************************************************************
  30.  
  31. $INCLUDE: 'C:\FG\FASTGRAF.FI'
  32.  
  33.       PROGRAM MAIN
  34.  
  35.       INTEGER DELAY, SCROLL_DELAY
  36.       COMMON  DELAY, SCROLL_DELAY
  37.  
  38.       INTEGER OLD_MODE, NEW_MODE
  39.       INTEGER COUNT
  40.       INTEGER STATUS
  41.       INTEGER*4 START_TIME
  42.  
  43.       INTEGER FG_ALLOCATE, FG_FREEPAGE
  44.       INTEGER FG_BESTMODE, FG_GETMODE, FG_MEASURE, FG_SHOWPPR
  45.       INTEGER*4 FG_GETCLOCK
  46.  
  47. C *** in case we're compiling for protected mode
  48.  
  49.       CALL FG_INITPM
  50.  
  51. C *** make sure a 320x200 color graphics mode is available
  52.  
  53.       NEW_MODE = FG_BESTMODE(320,200,2)
  54.       IF (NEW_MODE .LT. 0 .OR. NEW_MODE .EQ. 12) THEN
  55.          STOP 'This program requires a 320x200 color graphics mode.'
  56.       END IF
  57.  
  58. C *** determine the number of delay units per half clock tick
  59.  
  60.       DELAY = FG_MEASURE() / 2
  61.  
  62. C *** initialize Fastgraph for the selected video mode
  63.  
  64.       OLD_MODE = FG_GETMODE()
  65.       CALL FG_SETMODE(NEW_MODE)
  66.       STATUS = FG_ALLOCATE(1)
  67.       
  68. C *** display a packed pixel run file on a hidden page
  69.  
  70.       CALL FG_SETHPAGE(1)
  71.       CALL FG_SETPAGE(1)
  72.       CALL FG_MOVE(0,199)
  73.       STATUS = FG_SHOWPPR('FG.PPR'//CHAR(0),320)
  74.       CALL FG_SETPAGE(0)
  75.  
  76. C *** compute the number of delay units needed to make the text scroll
  77. C *** down at the same rate, regardless of the CPU speed or video mode
  78.  
  79.       COUNT = 0
  80.       CALL FG_WAITFOR(1)
  81.       START_TIME = FG_GETCLOCK()
  82. 10    CALL FG_SCROLL(0,319,0,7,4,1)
  83.       COUNT = COUNT + 1
  84.       IF (FG_GETCLOCK() .EQ. START_TIME) GO TO 10
  85.  
  86.       SCROLL_DELAY = (DELAY / 8) - (DELAY * 2) / COUNT
  87.       IF (SCROLL_DELAY .LT. 0) SCROLL_DELAY = 0
  88.  
  89. C *** demonstrate the inward tunnel effect
  90.  
  91.       CALL ANNOUNCE('inward tunnel effect')
  92.       CALL INWARD_TUNNEL_EFFECT(0)
  93.       CALL FG_WAITFOR(27)
  94.       CALL ANNOUNCE('inward tunnel effect with delay')
  95.       CALL INWARD_TUNNEL_EFFECT(DELAY)
  96.       CALL FG_WAITFOR(27)
  97.  
  98. C *** demonstrate the outward tunnel effect
  99.  
  100.       CALL ANNOUNCE('outward tunnel effect')
  101.       CALL OUTWARD_TUNNEL_EFFECT(0)
  102.       CALL FG_WAITFOR(27)
  103.       CALL ANNOUNCE('outward tunnel effect with delay')
  104.       CALL OUTWARD_TUNNEL_EFFECT(DELAY)
  105.       CALL FG_WAITFOR(27)
  106.  
  107. C *** demonstrate the diagonal fade
  108.  
  109.       CALL ANNOUNCE('diagonal fade')
  110.       CALL DIAGONAL_FADE(0)
  111.       CALL FG_WAITFOR(27)
  112.       CALL ANNOUNCE('diagonal fade with delay')
  113.       CALL DIAGONAL_FADE(DELAY/2)
  114.       CALL FG_WAITFOR(27)
  115.  
  116. C *** demonstrate the horizontal random fade
  117.  
  118.       CALL ANNOUNCE('horizontal random fade')
  119.       CALL HORIZONTAL_RANDOM_FADE(DELAY)
  120.       CALL FG_WAITFOR(27)
  121.  
  122. C *** demonstrate the curtain effect
  123.  
  124.       CALL ANNOUNCE('curtain')
  125.       CALL CURTAIN(DELAY/8)
  126.       CALL FG_WAITFOR(27)
  127.  
  128. C *** demonstrate the spiral effect
  129.  
  130.       CALL ANNOUNCE('spiral')
  131.       CALL SPIRAL_NORMAL(DELAY*2)
  132.       CALL FG_WAITFOR(27)
  133.  
  134. C *** demonstrate the layered spiral effect
  135.  
  136.       CALL ANNOUNCE('layered spiral')
  137.       CALL SPIRAL_LAYERED(DELAY)
  138.       CALL FG_WAITFOR(27)
  139.  
  140. C *** demonstrate the dual spiral effect
  141.  
  142.       CALL ANNOUNCE('dual spiral')
  143.       CALL SPIRAL_DUAL(DELAY/2)
  144.       CALL FG_WAITFOR(27)
  145.  
  146. C *** demonstrate the split screen effect
  147.  
  148.       CALL ANNOUNCE('split screen')
  149.       CALL SPLIT_SCREEN(DELAY/2)
  150.       CALL FG_WAITFOR(27)
  151.  
  152. C *** demonstrate the unveil effect
  153.  
  154.       CALL ANNOUNCE('unveil')
  155.       CALL UNVEIL(DELAY/4)
  156.       CALL FG_WAITFOR(27)
  157.  
  158. C *** demonstrate the "venetian blind" effect
  159.  
  160.       CALL ANNOUNCE('venetian blind')
  161.       CALL VENETIAN_BLIND(DELAY)
  162.       CALL FG_WAITFOR(27)
  163.  
  164. C *** restore the original video mode and screen attributes
  165.  
  166.       STATUS = FG_FREEPAGE(1)
  167.       CALL FG_SETMODE(OLD_MODE)
  168.       CALL FG_RESET
  169.  
  170.       STOP ' '
  171.       END
  172.  
  173. C*****************************************************************************
  174. C                                                                            *
  175. C  ANNOUNCE                                                                  *
  176. C                                                                            *
  177. C  Display the name of the special effect we're about to see.                *
  178. C                                                                            *
  179. C*****************************************************************************
  180.  
  181.       SUBROUTINE ANNOUNCE(MESSAGE)
  182.       CHARACTER*(*) MESSAGE
  183.  
  184.       INTEGER Y
  185.  
  186. C *** clear the screen
  187.  
  188.       CALL FG_ERASE
  189.  
  190. C *** display the specified message at the top row
  191.  
  192.       CALL FG_SETCOLOR(10)
  193.       CALL FG_JUSTIFY(0,-1)
  194.       CALL FG_MOVE(160,15)
  195.       CALL FG_FONTSIZE(16)
  196.       CALL FG_PRINT(MESSAGE,LEN(MESSAGE))
  197.  
  198. C *** scroll the message to the center of the screen
  199.  
  200.       CALL FG_SETCOLOR(0)
  201.  
  202.       DO 10 Y = 0,95,4
  203.          CALL FG_SCROLL(0,319,Y,Y+15,4,1)
  204.          CALL FG_STALL(SCROLL_DELAY)
  205. 10    CONTINUE
  206.  
  207. C *** wait 1.5 seconds
  208.  
  209.       CALL FG_WAITFOR(27)
  210.  
  211.       RETURN
  212.       END
  213.  
  214. C*****************************************************************************
  215. C                                                                            *
  216. C  IRANDOM                                                                   *
  217. C                                                                            *
  218. C  Random number generator used in some of the effects.  It returns an       *
  219. C  integer between min and max inclusive.                                    *
  220. C                                                                            *
  221. C*****************************************************************************
  222.  
  223.       INTEGER FUNCTION IRANDOM(MIN,MAX)
  224.       INTEGER MIN, MAX
  225.  
  226.       INTEGER SEED, TEMP
  227.       DATA SEED /12345/
  228.  
  229.       TEMP = IEOR(SEED,ISHFT(SEED,-7))
  230.       SEED = IAND(IEOR(ISHFT(TEMP,8),TEMP),#7FFF)
  231.       IRANDOM = MOD(SEED,MAX-MIN+1) + MIN
  232.  
  233.       RETURN
  234.       END
  235.  
  236. C*****************************************************************************
  237. C                                                                            *
  238. C  CURTAIN                                                                   *
  239. C                                                                            *
  240. C  Reveal each row, one at a time, starting from the bottom and proceeding   *
  241. C  to the top.  This gives the effect of a curtain rising, hence the name.   *
  242. C                                                                            *
  243. C*****************************************************************************
  244.  
  245.       SUBROUTINE CURTAIN(DELAY)
  246.       INTEGER DELAY
  247.  
  248.       INTEGER Y
  249.  
  250.       DO 10 Y = 199,0,-1
  251.          CALL FG_RESTORE(0,319,Y,Y)
  252.          CALL FG_STALL(DELAY)
  253. 10    CONTINUE
  254.  
  255.       RETURN
  256.       END
  257.  
  258. C***************************************************************************** 
  259. C                                                                            *
  260. C  DIAGONAL_FADE                                                             *
  261. C                                                                            *
  262. C  This reveals the hidden page in two diagonal segments, separated by an    *
  263. C  imaginary line extending from the lower left corner to the upper right    *
  264. C  corner of the screen.  We start with the top line of the left segment and *
  265. C  the bottom line of the right segment, and continue until the entire       *
  266. C  screen is revealed.                                                       *
  267. C                                                                            *
  268. C*****************************************************************************
  269.  
  270.       SUBROUTINE DIAGONAL_FADE(DELAY)
  271.       INTEGER DELAY
  272.  
  273.       INTEGER XMIN, XMAX
  274.       INTEGER YMIN, YMAX
  275.  
  276.       XMIN = 0
  277.       XMAX = 319
  278.       YMIN = 0
  279.       YMAX = 199
  280.  
  281. 10    IF (XMAX .GT. 0) THEN
  282.          CALL FG_RESTORE(0,XMAX,YMIN,YMIN+4)
  283.          CALL FG_RESTORE(XMIN,319,YMAX-4,YMAX)
  284.          CALL FG_STALL(DELAY)
  285.  
  286.          XMIN = XMIN + 8
  287.          XMAX = XMAX - 8
  288.          YMIN = YMIN + 5
  289.          YMAX = YMAX - 5
  290.          GO TO 10
  291.       ENDIF
  292.  
  293.       RETURN
  294.       END
  295.  
  296. C*****************************************************************************
  297. C                                                                            *
  298. C  HORIZONTAL_RANDOM_FADE                                                    *
  299. C                                                                            *
  300. C  In this effect, the screen is divided into a series of two-pixel high     *
  301. C  rows.  Each row is revealed in random parts from left to right.  This     *
  302. C  process repeats 20 times, once for each row.  At the end, a call to the   *
  303. C  CALL FG_restore routine guarantees that all rows are transferred.              *
  304. C                                                                            *
  305. C*****************************************************************************
  306.  
  307.       SUBROUTINE HORIZONTAL_RANDOM_FADE(DELAY)
  308.       INTEGER DELAY
  309.  
  310.       INTEGER I, J
  311.       INTEGER XMIN, XMAX
  312.       INTEGER Y
  313.       INTEGER XPOS(0:99)
  314.  
  315.       DO 10 J = 0,99
  316.          XPOS(J) = 0
  317. 10    CONTINUE
  318.  
  319.       DO 30 I = 1,20
  320.          DO 20 J = 0,99
  321.             XMIN = XPOS(J)
  322.             IF (XMIN .LT. 320) THEN
  323.                XMAX = XMIN + IRANDOM(1,10) * 8
  324.                IF (XMAX .GT. 320) XMAX = 320
  325.                Y = J * 2
  326.                CALL FG_RESTORE(XMIN,XMAX-1,Y,Y+1)
  327.                XPOS(J) = XMAX
  328.             END IF
  329. 20       CONTINUE
  330.          CALL FG_STALL(DELAY)
  331. 30    CONTINUE
  332.  
  333. C *** make sure we got them all
  334.  
  335.       CALL FG_RESTORE(0,319,0,199)
  336.  
  337.       RETURN
  338.       END
  339.  
  340. C*****************************************************************************
  341. C                                                                            *
  342. C  INWARD_TUNNEL_EFFECT                                                      *
  343. C                                                                            *
  344. C  Starting at the screen edges, reveal the screen through a series of       *
  345. C  concentric hollow rectangles.                                             *
  346. C                                                                            *
  347. C*****************************************************************************
  348.  
  349.       SUBROUTINE INWARD_TUNNEL_EFFECT(DELAY)
  350.       INTEGER DELAY
  351.  
  352.       INTEGER XMIN, XMAX
  353.       INTEGER YMIN, YMAX
  354.  
  355.       XMIN = 0
  356.       XMAX = 319
  357.       YMIN = 0
  358.       YMAX = 199
  359.  
  360. 10    IF (XMIN .LT. XMAX) THEN
  361.          CALL FG_RESTORE(0,319,YMIN,YMIN+4)
  362.          CALL FG_RESTORE(XMAX-7,XMAX,0,199)
  363.          CALL FG_RESTORE(0,319,YMAX-4,YMAX)
  364.          CALL FG_RESTORE(XMIN,XMIN+7,0,199)
  365.          CALL FG_STALL(DELAY)
  366.  
  367.          XMIN = XMIN + 8
  368.          XMAX = XMAX - 8
  369.          YMIN = YMIN + 5
  370.          YMAX = YMAX - 5
  371.          GO TO 10
  372.       ENDIF
  373.  
  374.       RETURN
  375.       END
  376.  
  377. C*****************************************************************************
  378. C                                                                            *
  379. C  OUTWARD_TUNNEL_EFFECT                                                     *
  380. C                                                                            *
  381. C  Starting at the screen center, reveal the screen through a series of      *
  382. C  concentric hollow rectangles.                                             *
  383. C                                                                            *
  384. C*****************************************************************************
  385.  
  386.       SUBROUTINE OUTWARD_TUNNEL_EFFECT(DELAY)
  387.       INTEGER DELAY
  388.  
  389.       INTEGER XMIN, XMAX
  390.       INTEGER YMIN, YMAX
  391.  
  392.       XMIN = 152
  393.       XMAX = 167
  394.       YMIN = 95
  395.       YMAX = 104
  396.  
  397. 10    IF (XMIN .GE. 0) THEN
  398.          CALL FG_RESTORE(XMIN,XMAX,YMIN,YMIN+5)
  399.          CALL FG_RESTORE(XMAX-7,XMAX,YMIN,YMAX)
  400.          CALL FG_RESTORE(XMIN,XMAX,YMAX-4,YMAX)
  401.          CALL FG_RESTORE(XMIN,XMIN+7,YMIN,YMAX)
  402.          CALL FG_STALL(DELAY)
  403.  
  404.          XMIN = XMIN - 8
  405.          XMAX = XMAX + 8
  406.          YMIN = YMIN - 5
  407.          YMAX = YMAX + 5
  408.          GO TO 10
  409.       ENDIF
  410.  
  411.       RETURN
  412.       END
  413.  
  414. C*****************************************************************************
  415. C                                                                            *
  416. C  SPIRAL_DUAL                                                               *
  417. C                                                                            *
  418. C  In this effect, we reveal the screen through two spirals.  One spiral     *
  419. C  emanates clockwise from the screen edges to the screen center, while the  *
  420. C  other emanates counterclockwise from the center to the screen edges.      *
  421. C                                                                            *
  422. C*****************************************************************************
  423.  
  424.       SUBROUTINE SPIRAL_DUAL(DELAY)
  425.       INTEGER DELAY
  426.  
  427.       INTEGER XMIN_OUTER, XMAX_OUTER
  428.       INTEGER YMIN_OUTER, YMAX_OUTER
  429.       INTEGER XMIN_INNER, XMAX_INNER
  430.       INTEGER YMIN_INNER, YMAX_INNER
  431.  
  432.       XMIN_OUTER = 0
  433.       XMAX_OUTER = 319
  434.       YMIN_OUTER = 0
  435.       YMAX_OUTER = 199
  436.  
  437.       XMIN_INNER = 152
  438.       XMAX_INNER = 167
  439.       YMIN_INNER = 95
  440.       YMAX_INNER = 104
  441.  
  442. 10    IF (XMIN_OUTER .LT. XMIN_INNER) THEN
  443.          CALL FG_RESTORE(XMIN_OUTER,XMAX_OUTER,YMIN_OUTER,YMIN_OUTER+4)
  444.          CALL FG_STALL(DELAY)
  445.          CALL FG_RESTORE(XMIN_INNER,XMAX_INNER,YMAX_INNER-4,YMAX_INNER)
  446.          CALL FG_STALL(DELAY)
  447.          CALL FG_RESTORE(XMAX_OUTER-7,XMAX_OUTER,YMIN_OUTER,YMAX_OUTER)
  448.          CALL FG_STALL(DELAY)
  449.          CALL FG_RESTORE
  450.      +      (XMAX_INNER+1,XMAX_INNER+8,YMIN_INNER,YMAX_INNER)
  451.          CALL FG_STALL(DELAY)
  452.          CALL FG_RESTORE(XMIN_OUTER,XMAX_OUTER,YMAX_OUTER-4,YMAX_OUTER)
  453.          CALL FG_STALL(DELAY)
  454.          CALL FG_RESTORE
  455.      +      (XMIN_INNER-8,XMAX_INNER,YMIN_INNER,YMIN_INNER+4)
  456.          CALL FG_STALL(DELAY)
  457.          CALL FG_RESTORE(XMIN_OUTER,XMIN_OUTER+7,YMIN_OUTER,YMAX_OUTER)
  458.          CALL FG_STALL(DELAY)
  459.          CALL FG_RESTORE
  460.      +      (XMIN_INNER-8,XMIN_INNER-1,YMIN_INNER,YMAX_INNER+5)
  461.          CALL FG_STALL(DELAY)
  462.  
  463.          XMIN_OUTER = XMIN_OUTER + 8
  464.          XMAX_OUTER = XMAX_OUTER - 8
  465.          YMIN_OUTER = YMIN_OUTER + 5
  466.          YMAX_OUTER = YMAX_OUTER - 5
  467.  
  468.          XMIN_INNER = XMIN_INNER - 8
  469.          XMAX_INNER = XMAX_INNER + 8
  470.          YMIN_INNER = YMIN_INNER - 5
  471.          YMAX_INNER = YMAX_INNER + 5
  472.  
  473.          GO TO 10
  474.       END IF
  475.  
  476.       RETURN
  477.       END
  478.  
  479. C*****************************************************************************
  480. C                                                                            *
  481. C  SPIRAL_LAYERED                                                            *
  482. C                                                                            *
  483. C  This effect is similar to the normal spiral.  Instead of revealing the    *
  484. C  screen in one iteration, this effect does so in four iterations (layers), *
  485. C  each moving more toward the screen center.                                *
  486. C                                                                            *
  487. C*****************************************************************************
  488.  
  489.       SUBROUTINE SPIRAL_LAYERED(DELAY)
  490.       INTEGER DELAY
  491.  
  492.       INTEGER I
  493.       INTEGER XMIN, XMAX
  494.       INTEGER YMIN, YMAX
  495.  
  496.       DO 20 I = 0,3
  497.          XMIN = I * 8
  498.          XMAX = 319 - XMIN
  499.          YMIN = I * 5
  500.          YMAX = 199 - YMIN
  501.  
  502. 10       IF (XMIN .LT. XMAX) THEN
  503.             CALL FG_RESTORE(XMIN,XMAX,YMIN,YMIN+4)
  504.             CALL FG_STALL(DELAY)
  505.             CALL FG_RESTORE(XMAX-7,XMAX,YMIN,YMAX)
  506.             CALL FG_STALL(DELAY)
  507.             CALL FG_RESTORE(XMIN,XMAX,YMAX-4,YMAX)
  508.             CALL FG_STALL(DELAY)
  509.             CALL FG_RESTORE(XMIN,XMIN+7,YMIN,YMAX)
  510.             CALL FG_STALL(DELAY)
  511.  
  512.             XMIN = XMIN + 32
  513.             XMAX = XMAX - 32
  514.             YMIN = YMIN + 20
  515.             YMAX = YMAX - 20
  516.             GO TO 10
  517.          END IF
  518. 20    CONTINUE
  519.  
  520.       RETURN
  521.       END
  522.  
  523. C*****************************************************************************
  524. C                                                                            *
  525. C  SPIRAL_NORMAL                                                             *
  526. C                                                                            *
  527. C  This is a spiral effect in which we reveal the screen as a series of      *
  528. C  rectangles, emanating from the screen edges and proceeding clockwise to   *
  529. C  the center of the screen.                                                 *
  530. C                                                                            *
  531. C*****************************************************************************
  532.  
  533.       SUBROUTINE SPIRAL_NORMAL(DELAY)
  534.       INTEGER DELAY
  535.  
  536.       INTEGER XMIN, XMAX
  537.       INTEGER YMIN, YMAX
  538.  
  539.       XMIN = 0
  540.       XMAX = 319
  541.       YMIN = 0
  542.       YMAX = 199
  543.  
  544. 10    IF (XMIN .LT. XMAX) THEN
  545.          CALL FG_RESTORE(XMIN,XMAX,YMIN,YMIN+19)
  546.          CALL FG_STALL(DELAY)
  547.          CALL FG_RESTORE(XMAX-31,XMAX,YMIN,YMAX)
  548.          CALL FG_STALL(DELAY)
  549.          CALL FG_RESTORE(XMIN,XMAX,YMAX-19,YMAX)
  550.          CALL FG_STALL(DELAY)
  551.          CALL FG_RESTORE(XMIN,XMIN+31,YMIN,YMAX)
  552.          CALL FG_STALL(DELAY)
  553.  
  554.          XMIN = XMIN + 32
  555.          XMAX = XMAX - 32
  556.          YMIN = YMIN + 20
  557.          YMAX = YMAX - 20
  558.          GO TO 10
  559.       END IF
  560.  
  561.       RETURN
  562.       END
  563.  
  564. C*****************************************************************************
  565. C                                                                            *
  566. C  SPLIT_SCREEN                                                              *
  567. C                                                                            *
  568. C  Reveal the top half of from left to right while revealing the bottom half *
  569. C  from right to left.                                                       *
  570. C                                                                            *
  571. C*****************************************************************************
  572.  
  573.       SUBROUTINE SPLIT_SCREEN(DELAY)
  574.       INTEGER DELAY
  575.  
  576.       INTEGER XMIN, XMAX
  577.  
  578.       XMIN = 0
  579.       XMAX = 319
  580.  
  581. 10    IF (XMAX .GT. 0) THEN
  582.          CALL FG_RESTORE(XMIN,XMIN+7,0,99)
  583.          CALL FG_RESTORE(XMAX-7,XMAX,100,199)
  584.          CALL FG_STALL(DELAY)
  585.          XMIN = XMIN + 8
  586.          XMAX = XMAX - 8
  587.          GO TO 10
  588.       END IF
  589.  
  590.       RETURN
  591.       END
  592.  
  593. C*****************************************************************************
  594. C                                                                            *
  595. C  UNVEIL                                                                    *
  596. C                                                                            *
  597. C  Starting at the center, reveal the screen in small horizontal increments  *
  598. C  until we reach the left and right edges.                                  *
  599. C                                                                            *
  600. C*****************************************************************************
  601.  
  602.       SUBROUTINE UNVEIL(DELAY)
  603.       INTEGER DELAY
  604.  
  605.       INTEGER XMIN, XMAX
  606.  
  607.       XMIN = 152
  608.       XMAX = 167
  609.  
  610. 10    IF (XMIN .GE. 0) THEN
  611.          CALL FG_RESTORE(XMIN,XMIN+7,0,199)
  612.          CALL FG_RESTORE(XMAX-7,XMAX,0,199)
  613.          CALL FG_STALL(DELAY)
  614.          XMIN = XMIN - 8
  615.          XMAX = XMAX + 8
  616.          GO TO 10
  617.       END IF
  618.  
  619.       RETURN
  620.       END
  621.  
  622. C*****************************************************************************
  623. C                                                                            *
  624. C  VENETIAN_BLIND                                                            *
  625. C                                                                            *
  626. C  Reveal the screen in four iterations, each revealing every fourth row.    *
  627. C  The effect produced resembles opening a Venetian blind.                   *
  628. C                                                                            *
  629. C*****************************************************************************
  630.  
  631.       SUBROUTINE VENETIAN_BLIND(DELAY)
  632.       INTEGER DELAY
  633.  
  634.       INTEGER Y
  635.  
  636.       DO 10 Y = 0,199,4
  637.          CALL FG_RESTORE(0,319,Y,Y)
  638. 10    CONTINUE
  639.       CALL FG_STALL(DELAY)
  640.  
  641.       DO 20 Y = 1,199,4
  642.          CALL FG_RESTORE(0,319,Y,Y)
  643. 20    CONTINUE
  644.       CALL FG_STALL(DELAY)
  645.  
  646.       DO 30 Y = 2,199,4
  647.          CALL FG_RESTORE(0,319,Y,Y)
  648. 30    CONTINUE
  649.       CALL FG_STALL(DELAY)
  650.  
  651.       DO 40 Y = 3,199,4
  652.          CALL FG_RESTORE(0,319,Y,Y)
  653. 40    CONTINUE
  654.       CALL FG_STALL(DELAY)
  655.  
  656.       RETURN
  657.       END
  658.